<script type="text/template" id="actionable-template">
    <div >
		<div class="view">
			<input type="checkbox" name="completed" class="toggle" <%= (status==4) ? 'checked="checked"' : '' %> /> 
			<label><%= name %></label> <a class="delete">[X]</a>
		</div>
		<input class="edit" type="text" value="<%= name %>" />
	</div>
</script>
<script type="text/template" id="stats-template">
	<% if (completed) { %>
      <a id="clear-completed">Clear <%= completed %> completed <%= completed == 1 ? 'actionable' : 'actionables' %></a>
    <% } %>
    <div class="actionable-count"><b><%= remaining %></b> <%= remaining == 1 ? 'item' : 'items' %> left</div>
</script>

<script type="text/javascript" src="<?php echo WEBCONTEXT; ?>/public/js/seednia.actionable.js"></script>
<?php $userInfo = $requestContext->userInfo; ?>
						
						<div id="actionable-component" >
							<header id="actionable-component-header">
								<h5>Actionables</h5>
								<input type="text" id="new-actionable" name="new-actionable" class="input-medium" placeholder="New Actionable" >
							</header>
							<section id="actionable-component-main">
								<ul id="actionable-list" ></ul>
							</section>
							<footer id="actionable-component-footer">
							</footer>
						</div>

						<script type="text/javascript">
(function ($) {

var actionables = new seednia.ActionableCollection(null, { domainId: "<?php echo $requestContext->domainId; ?>",
<?php if (isset($project)) { 
	echo 'projectSid: '.$project->sid.',';
} ?>
	creatorSid: <?php echo $userInfo->sid; ?> });

var actionableComponentView = new seednia.ActionableComponentView({ 
	collection:  actionables, 
	el: $("#actionable-component")
});

} (jQuery));

</script>